Xend: Fix blkif type check for tap devices.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 13 May 2008 11:43:24 +0000 (12:43 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 13 May 2008 11:43:24 +0000 (12:43 +0100)
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
tools/python/xen/xend/server/blkif.py

index 82853d6fbf46104733649ee6951bca1376301136..a94bc66b3a722958793e7e16004c0aef4b0f6e8c 100644 (file)
@@ -56,9 +56,10 @@ class BlkifController(DevController):
         else:
             try:
                 (typ, params) = string.split(uname, ':', 1)
-                if typ not in ('phy', 'file'):
+                if typ not in ('phy', 'file', 'tap'):
                     raise VmError(
-                        'Block device must have "phy" or "file" specified to type')
+                        'Block device must have "phy", "file" or "tap" '
+                        'specified to type')
             except ValueError:
                 raise VmError(
                     'Block device must have physical details specified')